package adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import base.BaseApplication;
import javabean.Life_Login_UserInfo;
import xm.chengdu.com.beijing_211.R;


/**
 * Created by 浠栫殑鐚� on 2016/12/3.
 * 閾惰鍗￠�傞厤鍣�
 */

public class ErrAdapter extends Base_Z_Adapter {
    ErrAdapter.Holder holder;

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        // 复用convertView
        if (null == convertView) {
            convertView = LayoutInflater.from(BaseApplication.getInstance())
                    .inflate(R.layout.tab_lv, null);
            holder = new ErrAdapter.Holder();

            holder.name = (TextView) convertView
                    .findViewById(R.id.name);
            holder.time = (TextView) convertView
                    .findViewById(R.id.time);

            // 设置Holder
            convertView.setTag(holder);
        } else {
            holder = (ErrAdapter.Holder) convertView.getTag();
        }
        Life_Login_UserInfo bluetoothDevice = (Life_Login_UserInfo) getItem(position);
        holder.name.setText(bluetoothDevice.getAccount());
        holder.time.setText(bluetoothDevice.getPassword());

        return convertView;
    }


    public class Holder {

        TextView name,time;

    }
}
